package com.rabbiter.oes.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.rabbiter.oes.entity.FillQuestionHistory;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 填空题历史答题记录
 */
@Mapper
public interface FillQuestionHistoryMapper extends BaseMapper<FillQuestionHistory> {

    /**
     * 通过考题id获取填空考题信息
     * @param scoreId
     * @return
     */
    default List<FillQuestionHistory> selectByScoreId(Integer scoreId) {
        return selectList(Wrappers.lambdaQuery(FillQuestionHistory.class).eq(FillQuestionHistory::getScoreId, scoreId));
    }

}
